using System;

namespace extend_360.utils
{
    public class SystemUtils
    {
        /// <summary>
        /// 获取运行目录
        /// </summary>
        /// <returns></returns>
        public static string GetDomainPath()
        {
            return AppDomain.CurrentDomain.BaseDirectory;
        }

        public static void ConsoleWrite(string content, ConsoleColor? color)
        {
            ConsoleColor originalColor = Console.ForegroundColor;
            if (color != null)
            {
                // 设置控制台前景色为红色
                Console.ForegroundColor = color.Value;
            }

            Console.WriteLine(content);

            Console.ForegroundColor = originalColor;
        }
    }
}